<UserControl x:Class="Microsoft.Robotics.Vision.Visualization.RGBDCameraView" 
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:v="clr-namespace:Microsoft.Robotics.Visualization;assembly=Microsoft.Robotics.Visualization" 
             mc:Ignorable="d"
             d:DesignHeight="480" d:DesignWidth="640">
    <DockPanel x:Name="parentDock">
        <StackPanel Orientation="Horizontal"  DockPanel.Dock="Top">
            <TextBlock VerticalAlignment="Center" Text="{Binding ElementName=blendSlider, Path=Value, StringFormat=Blend: {0}}" Width="70"/>
            <Slider x:Name="blendSlider" ToolTip="Change blend value." Value="{Binding Path=Blend}" SmallChange="1" Width="100" Maximum="1"/>
            <RadioButton GroupName="Image" Content="Color Image" IsChecked="{Binding Path=DisplayColor}"/>
            <RadioButton GroupName="Image" Content="Depth Image" IsChecked="{Binding Path=DisplayDepth}"/>
            <RadioButton GroupName="Image" Content="Ponit Cloud" IsChecked="{Binding Path=PointCloud}"/>
        </StackPanel>
        <StackPanel Orientation="Horizontal"  DockPanel.Dock="Top">
            <TextBlock VerticalAlignment="Center" Text="{Binding ElementName=maxValue, Path=Value, StringFormat=Max {0}}" Width="70"/>
            <Slider x:Name="maxValue" ToolTip="Set minimum distance." Value="{Binding Path=MaxValue}" SmallChange="1" Width="500" Minimum="2" Maximum="45000"/>
            <CheckBox IsChecked="{Binding Path=LimitColor}" Width="100">Limit Range</CheckBox>
        </StackPanel>
        <StackPanel Orientation="Horizontal"  DockPanel.Dock="Top">
            <TextBlock VerticalAlignment="Center" Text="{Binding ElementName=minValue, Path=Value, StringFormat=Min {0}}" Width="70"/>
            <Slider x:Name="minValue" ToolTip="Set minimum distance." Value="{Binding Path=MinValue}" SmallChange="1" Width="500" Minimum="1" Maximum="44999"/>
        </StackPanel>
        <Grid RenderTransformOrigin="0.5,0.5">
            <Grid.RenderTransform>
                <ScaleTransform ScaleX="1" ScaleY="1"/>
            </Grid.RenderTransform>
            <v:VideoStreamControl x:Name="image" HorizontalAlignment="Stretch" Margin="0,0,0,0" VerticalAlignment="Stretch" Frame="{Binding Path=VideoFrame}" PreviewMouseLeftButtonDown="OnMouseDown" MouseLeftButtonUp="OnMouseUp" MouseMove="OnMouseMove" PreviewMouseWheel="OnMouseWheel"/>
        </Grid>
    </DockPanel>
</UserControl>
